<%@ page language="java" import="reg.domain.*,java.util.*" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
	<title>Mis Amigos</title>
	<link href="estilo.css" rel="stylesheet" type="text/css" />
</head>


<body>
<br><br><br>
<div id="main">

<div id="header">
	<div id="logo">
	<a href="index.jsp#">Regulacion Informatica</a>
	</div>
</div>

<div id="content">

<div id="left">
		<table cellSpacing="1" cellPadding="6" width="770" align="center" border="0">
		<tr valign ="middle" align="center">
			<td  colspan="6"><b>Amigos de <%=session.getAttribute("session.user")%> </b></td>
		</tr>
		<tr valign ="middle" align="center" id="cabecera">
			<td>&nbsp;</td>
			<td>Nombre</td>
			<td>Descripción</td>
			<td>Ciudad</td>
			<td>Edad</td>
		</tr>
<% 
	   int indice= 0;
       Usuario u = UserManager.getInstance(session.getAttribute("session.user").toString()).getUsuario();
            	for(Usuario amigo : u.getAmigos()){    
            		++indice;
%>
		<tr align="center" >
			<td><%= indice %></td>
			<td> <%= amigo.getNombre() %> </td>
			<td> <%= amigo.getDescripcion() %> </td>
			<td> <%= amigo.getCiudad() %> </td>
			<td> <%= amigo.getEdad() %> </td>
		</tr>
<%
            	}
            
		
%>

	</table>
	</div>	

</div>

<div id="down">
	<div id="footer">
 		 <p>ISG3 Curso 2010 - 2011 </p>
 	 </div>
 </div>


</div>

</body>
</html>